<div class="dialog">
  <div class="tabPanel">
    <div class="tabs">
      <div class="chrome">
        <ul class="toptabs">
          <% ["Skyline::MediaFile", "Skyline::ReferableUri"].each do |tab| %>
            <li class="<%= "active" if @active_tab == tab %>"><a href="#"><%= t(tab, :scope => [:browser,:tabs]) %></a></li>          
          <% end %>          
        </ul>
      </div>
    </div>
  </div>
  <%= render :partial => "skyline/browser/tabs/media_library/index" %>
  <%= render :partial => "skyline/browser/tabs/external_image/index" %>
  <% if params[:common] %>
    <div class="commonPanel">
      <div class="content" style="border-top: 1px solid #000">
        <table class="fields">
          <tbody>
            <tr>
              <th><label for="browserAlt"><%= t(:alt, :scope => [:browser,:image]) %>:</label></th>
              <td><input id="browserAlt" type="text" name="browser[alt]" value="<%= params[:alt] %>"/></td>
            </tr>
            <tr>
              <th><label for="browserClass"><%= t(:align, :scope => [:browser,:image]) %>:</label></th>
              <td>
                <select id="browserClass" name="browser[class]">
                  <% selected_class = params[:class].blank? ? nil : params[:class] %>
                  <% [nil, "left","right","block"].each do |al| %>
                    <option value="<%= al %>" <%= 'selected="selected"' if al == selected_class %>>
                      <%= t(al || "-", :scope => [:browser,:image,:alignments]) %>
                    </option>
                  <% end %>
                </select>
              </td>
            </tr>
            <tr>
              <th><%= t(:dimensions, :scope => [:browser,:image]) %>:</th>
              <td>
                <input id="browserImageWidth" class="number" name="browser[width]" value="<%= params[:width] %>"/>
                x
                <input id="browserImageHeight" class="number" name="browser[height]" value="<%= params[:height] %>"/>
              </td>
            </tr>            
          </tbody>
        </table>
      </div>
    </div>
  <% end %>
  <div class="footerPanel">
    <div class="content">
      <div class="submit">
        <%= link_to_function t(:cancel, :scope => [:buttons]), "Skyline.Dialog.current.cancel()", :class => "cancel" %>
        <%= link_to_function button_text(:ok), "Skyline.Dialog.current.select()", :class => "button small green" %>
      </div>
    </div>
  </div>
</div>

<script type="text/javascript" charset="utf-8">
  Skyline.Dialog.current.setTitle("<%= t(:dialog_title, :scope => [:browser,:image]) %>");
</script>